import request from "./request";
var BASE_API =
    process.env.VUE_APP_DEV_SERVER_API /* 跨域请求 vue.config中封装 */,
  post = "post",
  get = "get";
/* 数据添加 post /addListData */
export const addData = function(data) {
  return request({
    method: post,
    url: `${BASE_API}/addListData`,
    data,
  });
};

/* 列表查询  */
export const findList = function(params) {
  return request({
    method: get,
    url: `${BASE_API}/findList`,
    params,
  });
};

/* 详情查看 showDetail */
export const showDetail = function(data) {
  return request({
    method: post,
    url: `${BASE_API}/showDetail`,
    data,
  });
};

/* 列表删除 */
export const deleteData = function(params) {
  return request({
    method: get,
    url: `${BASE_API}/deleteData`,
    params,
  });
};

/* 编辑提交 */
export const upData = function(data) {
  return request({
    method: post,
    url: `${BASE_API}/upData`,
    data,
  });
};
